var result = string.Join(",", arr);
input.split(/[ ,]+/); //splits string using RegEx on a space OR a comma